CreateIndex

An arexx script to create HTML picture index using ImageStudio

Contents



What does it do?

Anyone with more than a handful of pictures with know that even with the most verbose filenames it can still be hard to track down the particular image which you seek. So people have written various proggys to catalogue your pics. The simplest of these being those that create thumbnails (small versions) of your pics and generate a HTML file to allow them to be viewed in favouite browser. You've guessed it this is what CreateIndex does!



How do you use it?

Installation

Copy the files from the Rexx directory to your ImageStufdio/Rexx directory. Stick this file where you like it. That's all.

Extra Scripts

Usage

Initially : Open the scripts window in ImageStudio and double click on CreateIndex. Shift select all files you want to be in index or just hit 'All'. Wait with baited breath. A file called index.html will be generated in the directory.

Updating : If you have added more files to a directory simply repeat the previous process the file pattern will be set not to show the index file (other html files will appear) or any thumbnails.

Advanced : All the parameters are constants defined in the script itself this means if you want to change things you will need to edit the script yourself Shreaks of horror!!!. Don't worry its dead easily if you can type and breath (preferably at the same time). All the values that you may wish to change are near the top of the script:


/* PROGRAM CONSTANTS - change these values to suit */

HTMLFile='Index.html'   /* What to call the html file, Oh Yes */
SquareSize=100          /* Size of square into which to fit pic */
TNFormat='PNG'          /* Thumbnail file format */
TNExten='png'           /* Thumnail file extension */
TNPrefix='TN'           /* Thumbnail prefix */
TableColumns=5          /* No. of pics per row */
TableBorder=1           /* Size of table borders, in pixels */

FilePattern='~('HTMLFile'|'TNPrefix'#?)' /* only change if you understand arexx */

Useful Tips

Minimise the image window before batch processing a lot of images as it will make the redraw time shorter and decrease the time for the batch process to run



Why doesn't it XXXXX?

Why are there two versions of the script?

The second script will generate the dimensions for the image in the HTML which means the browser can create the table and show you it while each image loads up, nice eh! Unfortunately this means that since it doesn't generate thumbnails if they exist it still has to load the thumbnail to obtain the dimensions. Hence if you are updating a large directory to which you've added just a few files it can take quite a long time as it loads each thumbnail. So you've got a choice.

Why is this in HTML?

I can write HTML, this is a HTML tool (get HTML datatype if your browser is to slow to load), HTML is better etc.

Why don't you use requesters to get the parameters?

Some of the scripts supplied use ImageStudios own requesters, its really tedious if you've got more than a few indices to create to anwser a load of questions each time. I could have used a nice external GUI arexxgadtools type of library but I wanted to keep things small and simple, inkeeping with the ImageStudio philosophy. Finally, you can use a text editor can' you!?

Why did you bother when others have already?

I didn't won't to invest (or need) in a picture cataloguer, I couldn't get the others to work or I didn't like them. ImageStudio is brilliant has an excellent Arexx API that begs to be used (there's even an Arexx tutorial in the guide) and I wanted to learn Arexx - yes, this is my first script. Phew!



To do

Possibly add row limit and then generate multiple indices for large number of pics with prev and next links.



Who wrote this?

James S Perrin j.perrin@mcc.ac.uk

This archive is freely distributable as long as the archive remains unchanged. Copyright remains with the author. I'd appreciate an email if anyone likes it.